package com.wu.ssm.spring;

import com.wu.ssm.spring.core.ConfigHelper;
import com.wu.ssm.spring.mvc.DataContext;
import com.wu.ssm.spring.utils.CastUtil;

/**
 * Created by wzf on 2018/12/22/022.
 */
public class Tool {

    public static int getPageSize(String key) {
        return CastUtil.castInt(DataContext.Cookie.get("cookie.ps_" + key), 10);
    }

    public static String getBasePath() {
        return /*DataContext.getServletContext().getRealPath("") +*/ ConfigHelper.getString("sample.upload.path");
    }
}
